﻿using BCrypt.Net;

public class PasswordHasher : IPasswordHasher
{
    public string Hash(string password)
    {
        // 让库自动生成 salt
        return BCrypt.Net.BCrypt.HashPassword(password);
    }

    public bool Verify(string hashedPassword, string inputPassword)
    {
        return BCrypt.Net.BCrypt.Verify(inputPassword, hashedPassword);
    }
}